<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<div id="need_edit" style="padding:10px 10px 10px 10px">
	<form id="needEditForm" method="post">
		<input type="hidden" name="designNo" value="${need.designNo}" />
		<input type="hidden" name="id" value="${need.id}" />
		<input type="hidden" name="isPon" value="${need.isPon }" />
		<table class="tm-tableAttr">
			<tr class="tm-tableAttrSub">
				<th colspan="14">设计需求</th>
			</tr>
			<tr>
				<th>设计编号</th>
				<td><input class="textbox" id="designNo" disabled name="designNo" value="${need.designNo}"></input></td>
				
			</tr>
			<tr class="tm-tableAttrSub">
				<th colspan="14">设计需求描述</th>
			</tr>
			<tr>
				<th>需求规格描述方式</th>
				<td><input class="textbox" name="drs" value="${need.drs }"></input></td>
			</tr>
			<c:if test="${need.isPon==0 }">
				<tr>
					<th>选择属性</th>
					<td>
					<select class="combo .combo-text combo-arrow-hover" style="width:370px;" name="isRequired">
							<option value="" ${(need.isRequired==null||need.isRequired=='')?'selected = "selected"':'' }>请选择</option>
							<option value="必选" ${need.isRequired=='必选'?'selected = "selected"':'' }>必选</option>
							<option value="可选" ${need.isRequired=='可选'?'selected = "selected"':'' }>可选</option>
							<option value="必选X填空" ${need.isRequired=='必选X填空'?'selected = "selected"':'' }>必选X填空</option>
							<option value="可选X填空" ${need.isRequired=='可选X填空'?'selected = "selected"':'' }>可选X填空</option>
							<option value="无关" ${need.isRequired=='无关'?'selected = "selected"':'' }>无关</option>
							<option value="填空，并在三级列填入对应的接口库第二级" ${need.isRequired=='填空，并在三级列填入对应的接口库第二级'?'selected = "selected"':'' }>填空，并在三级列填入对应的接口库第二级</option>
							<option value="选择时在子表做子项选择" ${need.isRequired=='选择时在子表做子项选择'?'selected = "selected"':'' }>选择时在子表做子项选择</option>
							<option value="IPRAN、PON必选" ${need.isRequired=='IPRAN、PON必选'?'selected = "selected"':'' }>IPRAN、PON必选</option>
							<option value="PON必选，其他可选" ${need.isRequired=='PON必选，其他可选'?'selected = "selected"':'' }>PON必选，其他可选</option>
							<option value="交流时必选，X填空" ${need.isRequired=='交流时必选，X填空'?'selected = "selected"':'' }>交流时必选，X填空</option>
	
					</select>
					</td>
				</tr>
			</c:if>
			<c:if test="${need.isPon==1 }" >
			<tr>
				<th>OLT/MSAN选择属性</th>
				<td><select class="combo .combo-text combo-arrow-hover"
					style="width:370px;" name="oltMsanPro">
						<option value="" ${(need.oltMsanPro==null||need.oltMsanPro=='')?'selected = "selected"':'' }>请选择</option>
						<option value="必选" ${need.oltMsanPro=='必选'?'selected = "selected"':'' }>必选</option>
						<option value="可选" ${need.oltMsanPro=='可选'?'selected = "selected"':'' }>可选</option>
						<option value="必选X填空" ${need.oltMsanPro=='必选X填空'?'selected = "selected"':'' }>必选X填空</option>
						<option value="可选X填空" ${need.oltMsanPro=='可选X填空'?'selected = "selected"':'' }>可选X填空</option>
						<option value="无关" ${need.oltMsanPro=='无关'?'selected = "selected"':'' }>无关</option>
						<option value="必选（与MAC转发单选）" ${need.oltMsanPro=='必选（与MAC转发单选）'?'selected = "selected"':'' }>必选（与MAC转发单选）</option>
						<option value="MSAN必选，其它无关" ${need.oltMsanPro=='MSAN必选，其它无关'?'selected = "selected"':'' }>MSAN必选，其它无关</option>
				</select></td>
			</tr>
			<tr>
				<th>ONU/MSAN选择属性</th>
				<td><select class="combo .combo-text combo-arrow-hover"
					style="width:370px;" name="onuMsanPro">
						<option value="" ${(need.onuMsanPro==null||need.onuMsanPro=='')?'selected = "selected"':'' }>请选择</option>
						<option value="必选" ${need.onuMsanPro=='必选'?'selected = "selected"':'' }>必选</option>
						<option value="可选" ${need.onuMsanPro=='可选'?'selected = "selected"':'' }>可选</option>
						<option value="必选X填空" ${need.onuMsanPro=='必选X填空'?'selected = "selected"':'' }>必选X填空</option>
						<option value="可选X填空" ${need.onuMsanPro=='可选X填空'?'selected = "selected"':'' }>可选X填空</option>
						<option value="无关" ${need.onuMsanPro=='无关'?'selected = "selected"':'' }>无关</option>
						<option value="必选（与MAC转发单选）" ${need.onuMsanPro=='必选（与MAC转发单选）'?'selected = "selected"':'' }>必选（与MAC转发单选）</option>
						<option value="MSAN必选，其它无关" ${need.onuMsanPro=='MSAN必选，其它无关'?'selected = "selected"':'' }>MSAN必选，其它无关</option>
						<option value="SFU可选，MDU必选" ${need.onuMsanPro=='SFU可选，MDU必选'?'selected = "selected"':'' }>SFU可选，MDU必选</option>
						<option value="必选，不带交换芯片的SFU为可选" ${need.onuMsanPro=='必选，不带交换芯片的SFU为可选'?'selected = "selected"':'' }>必选，不带交换芯片的SFU为可选</option>
				</select></td>
			</tr>
			</c:if>
			<tr class="tm-tableAttrSub">
				<th colspan="14">参数范围（规格）</th>
			</tr>
			<tr>
				<th>选择</th>
				<td><select class="combo .combo-text combo-arrow-hover"
					style="width:370px;" name="prChoose">
						<option value="" ${(need.prChoose==null||need.prChoose=='')?'selected = "selected"':'' }>请选择</option>
						<option value="新增" ${need.prChoose=='新增'?'selected = "selected"':'' }>新增</option>
				</select></td>
			</tr>
			<tr>
				<th>是否测试需求</th>
				<td><select class="combo .combo-text combo-arrow-hover"
					style="width:370px;" name="prIstest">
						<option value="" ${(need.prIstest==null||need.prIstest=='')?'selected = "selected"':'' }>请选择</option>
						<option value="否" ${need.prIstest=='否'?'selected = "selected"':'' }>否</option>
						<option value="是" ${need.prIstest=='是'?'selected = "selected"':'' }>是</option>
				</select></td>
			</tr>
			<tr>
				<th>需求规格说明</th>
				<td><input class="textbox" name="prSpecification" value="${need.prSpecification }"></input></td>
			</tr>
			<tr>
				<th>功能说明</th>
				<td><input class="textbox" name="prFunction" value="${need.prFunction }"></input></td>
			</tr>
			<tr class="tm-tableAttrSub">
				<th colspan="14"></th>
			</tr>
			<tr>
				<th>需求级别</th>
				<td><select class="combo .combo-text combo-arrow-hover"
					style="width:370px;" name="needDegree">
						<option value="" ${(need.needDegree==null||need.needDegree=='')?'selected = "selected"':'' }>请选择</option>
						<option value="5" ${need.needDegree=='5'?'selected = "selected"':'' }>5</option>
						<option value="4" ${need.needDegree=='4'?'selected = "selected"':'' }>4</option>
						<option value="3" ${need.needDegree=='3'?'selected = "selected"':'' }>3</option>
						<option value="2" ${need.needDegree=='2'?'selected = "selected"':'' }>2</option>
						<option value="1" ${need.needDegree=='1'?'selected = "selected"':'' }>1</option>
				</select></td>
			</tr>
			<tr>
				<th>实现版本</th>
				<td><input class="textbox" name="impVersion" value="${need.impVersion }"></input></td>
			</tr>
			<tr class="tm-tableAttrSub">
				<th colspan="14">系统联调需求符合度</th>
			</tr>
			<tr>
				<th>是否实现</th>
				<td><select class="combo .combo-text combo-arrow-hover"
					style="width:370px;" name="scIsimp">
						<option value="" ${(need.scIsimp==null||need.scIsimp=='')?'selected = "selected"':'' }>请选择</option>
						<option value="是" ${need.scIsimp=='是'?'selected = "selected"':'' }>是</option>
						<option value="否" ${need.scIsimp=='否'?'selected = "selected"':'' }>否</option>
				</select></td>
			</tr>
			<tr>
				<th>备注</th>
				<td><input class="textbox" name="scRemarks" value="${need.scRemarks }"></input></td>
			</tr>
			<tr class="tm-tableAttrSub">
				<th colspan="14">系统测试需求符合度</th>
			</tr>
			<tr>
				<th>是否实现</th>
				<td><select class="combo .combo-text combo-arrow-hover"
					style="width:370px;" name="stIsimp">
						<option value="" ${(need.stIsimp==null||need.stIsimp=='')?'selected = "selected"':'' }>请选择</option>
						<option value="是" ${need.stIsimp=='是'?'selected = "selected"':'' }>是</option>
						<option value="否" ${need.stIsimp=='否'?'selected = "selected"':'' }>否</option>
				</select></td>
			</tr>
			<tr>
				<th>备注</th>
				<td><input class="textbox" name="stRamarks" value="${need.stRamarks }"></input></td>
			</tr>
			<tr class="tm-tableAttrSub">
				<th colspan="14">物理架构</th>
			</tr>
		</table>
		<table>
			<tr>
				<th>MDU</th>
				<td><input type="checkbox" name="paMdu" value="√" ${need.paMdu=='√'?'checked="checked"':'' }/></td>
				<th>机盘B</th>
				<td><input type="checkbox" name="paDiskB" value="√" ${need.paDiskB=='√'?'checked="checked"':'' } /></td>
				<th>机盘C</th>
				<td><input type="checkbox" name="paDiskC" value="√" ${need.paDiskC=='√'?'checked="checked"':'' } /></td>
				<th>机盘D</th>
				<td><input type="checkbox" name="paDiskD" value="√" ${need.paDiskD=='√'?'checked="checked"':'' }/></td>
				<th>机盘E</th>
				<td><input type="checkbox" name="paDiskE" value="√" ${need.paDiskE=='√'?'checked="checked"':'' }/></td>
				<th>背板</th>
				<td><input type="checkbox" name="paBackplane" value="√" ${need.paBackplane=='√'?'checked="checked"':'' }/></td>
			</tr>
			<tr>
				<th>网管软件</th>
				<td><input type="checkbox" name="paRemotescope" value="√" value="√" ${need.paRemotescope=='√'?'checked="checked"':'' }/></td>
				<th>结构</th>
				<td><input type="checkbox" name="paStructure" value="√" value="√" ${need.paStructure=='√'?'checked="checked"':'' }/></td>
				<th>电缆</th>
				<td><input type="checkbox" name="paCable" value="√" value="√" ${need.paCable=='√'?'checked="checked"':'' }/></td>
				<th>电源盘</th>
				<td><input type="checkbox" name="paPowerPanel" value="√" value="√" ${need.paPowerPanel=='√'?'checked="checked"':'' }/></td>
				<th>风扇控制单元</th>
				<td><input type="checkbox" name="paFanControlUnit" value="√" value="√" ${need.paFanControlUnit=='√'?'checked="checked"':'' }/></td>
				<th>网元管理盘</th>
				<td><input type="checkbox" name="paMmcp" value="√" value="√" ${need.paMmcp=='√'?'checked="checked"':'' }/></td>
			</tr>
			<tr>
				<th>公务盘</th>
				<td><input type="checkbox" name="paOfficialDisk" value="√" ${need.paOfficialDisk=='√'?'checked="checked"':'' } /></td>
				<th>技术手册</th>
				<td><input type="checkbox" name="paTechnicalManual" value="√" ${need.paTechnicalManual=='√'?'checked="checked"':'' } /></td>
				<th>安装手册</th>
				<td><input type="checkbox" name="paInstallationManual" value="√" ${need.paInstallationManual=='√'?'checked="checked"':'' } /></td>
				<th>网管手册</th>
				<td><input type="checkbox" name="paNetManual" value="√" ${need.paNetManual=='√'?'checked="checked"':'' } /></td>
				<th>使用维护手册</th>
				<td><input type="checkbox" name="paUseManual" value="√" ${need.paUseManual=='√'?'checked="checked"':'' }/></td>
				<th>用户手册</th>
				<td><input type="checkbox" name="paUserManual" value="√" ${need.paUserManual=='√'?'checked="checked"':'' } /></td>
			</tr>

		</table>

		<table class="tm-tableAttr">
			<tr class="tm-tableAttrSub">
				<th colspan="14">需求设计</th>
			</tr>
			<tr>
				<th>触发条件</th>
				<td><input class="textbox" name="rdTriggerCondition" value="${need.rdTriggerCondition }"></input></td>
			</tr>
			<tr>
				<th>输入(input)</th>
				<td><input class="textbox" name="rdInput" value="${need.rdInput }"></input></td>
			</tr>
			<tr>
				<th>处理</th>
				<td><input class="textbox" name="rdHandle" value="${need.rdHandle }"></input></td>
			</tr>
			<tr>
				<th>输出(output)</th>
				<td><input class="textbox" name="rdOutput" value="${need.rdOutput }"></input></td>
			</tr>
			<tr>
				<th>特殊需求</th>
				<td><input class="textbox" name="rdSpecialNeeds" value="${need.rdSpecialNeeds}"></input></td>
			</tr>
		</table>
	</form>
	<div style="padding:5px">
		<a href="javascript:void(0)" class="button" onclick="submitForm()">提交</a>
		<a href="javascript:void(0)" class="button" onclick="redoForm()">取消</a>
	</div>
</div>
<script type="text/javascript">
	$(function(){
	});
	
function submitForm(){
	$.post("/need/edit",$("#needEditForm").serialize(), function(data){
		if(data.status==200){
			var id = data.data.id;
			var no = data.data.designNo;
			$.ajax({
				url:'/need/querybyno',
				dataType:'html',
				data:{
					id:id,
					designNo:no
				},
				success:function(data) {
					$('#need_edit').empty();
					$('#need_edit').append(data);
				}
			})
		}
	});
	
}
function redoForm(){
	var no = $('#designNo').val();
	$.ajax({
		url:'/need/querybyno',
		dataType:'html',
		data:{
			designNo:no
		},
		success:function(data) {
			$('#need_edit').empty();
			$('#need_edit').append(data);
		}
	})
}
</script>

